package com.buaa.aiguangxi.service;

import com.buaa.aiguangxi.dao.InstanceDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class InstanceService {
    @Autowired
    private InstanceDao instanceDao;
    public int addAnInstance(int sceneId,int isTraining,String instanceName){
        return instanceDao.addAnInstance(sceneId, isTraining, instanceName);
    }

    public List<Map<String,Object>> getRunningInstances(int sceneId){
        return instanceDao.getInstances(sceneId,false);
    }

    public List<Map<String,Object>> getTrainingInstances(int sceneId){
        return instanceDao.getInstances(sceneId,true);
    }
}

